package com.example.myapplication;

import android.os.Bundle;
import android.widget.GridView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    GridView photoGv;
    com.example.myapplication.photoAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        photoGv = findViewById(R.id.gv_photo);
        //数据源
        String[] imageurls = lmageUrls.imageurls;
        //适配器
        adapter = new com.example.myapplication.photoAdapter(this,imageurls);
        photoGv.setAdapter(adapter);


    }


}
